<#assign security=JspTaglibs["http://www.springframework.org/security/tags"] />
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试</title>
</head>

<body>
index page
<div>
    <form action="/logout" method="post">
        <input name="${(_csrf.parameterName)!}" value="${(_csrf.token)!}" type="hidden">
        <input type="submit" value="退出登录"/>
    </form>
</div>
<div>
    <a href="/order">订单管理</a><br/>
    <a href="/myError">自定义的错误</a><br/>

    <@security.authorize access="hasRole('ROLE_USER')">
        <span>有ROLE_USER权限</span>
    </@security.authorize>

    <@security.authorize access="hasRole('ROLE_ADMIN')">
        <span>有ROLE_ADMIN权限</span>
    </@security.authorize>

</div>
</body>
</html>
